package home.control.logicElements;

import java.util.*;

import android.util.Log;

public class Plan {
	
	private String name;
	private boolean isActive;
	List<Action> listOfActions= new ArrayList<Action>();
	
	@Override
	public String toString(){
		return name;
	}

	public void addAction(Action action) {
		listOfActions.add(action);
	}
	
	public void setActions(List<Action> act){
		listOfActions = act;
	}
	
	public String getName(){
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public List<Action> getActions(){
		return listOfActions;
	}

	public void removeAction(Action action) {
		boolean succes = listOfActions.remove(action);
		if(!succes){
			Log.d("Plan", "Usuwanie nie powidoło się");
		}
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}
	
}
